<html>

<head>
<meta http-equiv="Content-Language" content="en-us">
<title>Host Type</title>
<link rel="stylesheet" type="text/css" href="../stylesheets/antmanual.css">
</head>

<body>

<h2><a name="host">Host</a></h2> 

<p>Host is used to define a single host which can be used in any remote-related tasks or being nested in a hostset type. </p>
<table border="1" cellpadding="2" cellspacing="0">
  <tr>
    <td valign="top"><b>Attribute</b></td>
    <td valign="top"><b>Description</b></td>
    <td align="center" valign="top"><b>Required</b></td>
  </tr>
  <tr>
    <td valign="top">id</td>
    <td valign="top">for reference </td>
    <td valign="top" align="center">YES</td>
  </tr>
  <tr>
    <td valign="top">hostname</td>
    <td valign="top">name the the host </td>
    <td valign="top" align="center">YES</td>
  </tr>
  <tr>
    <td valign="top">ip</td>
    <td valign="top">ip address of the host </td>
    <td valign="top" align="center">YES</td>
  </tr>
  <tr>
    <td valign="top">port</td>
    <td valign="top">port number of the deamon process</td>
    <td valign="top" align="center">YES</td>
  </tr>
  <tr>
    <td valign="top">networking</td>
    <td valign="top">the fully qualified networking class name </td>
    <td valign="top" align="center">NO, default using RMI </td>
  </tr>
  <tr>
    <td valign="top">highwatermark</td>
    <td valign="top">the maximum number of processes the host can hold </td>
    <td valign="top" align="center">NO, default value is '1' </td>
  </tr>
  <tr>
    <td valign="top">basedir</td>
    <td valign="top">the base working dir on this host </td>
    <td valign="top" align="center">NO</td>
  </tr>
</table>
  <h4>NOTES:</h4>
  <p> Supported Networking Classes:</p>
  <ul>
    <li>org.dant.ant.extension.net.LocalHelper</li>
    <li>org.dant.ant.extension.net.socket.SocketHelper</li>
    <li>org.dant.ant.extension.net.rmi.RMIHelper</li>
    <li>org.dant.ant.extension.net.soap.SOAPServiceHelper</li>
  </ul>
  <p>You can extend the networking classes as you </p>
  <h4>Examples</h4>
<blockquote>
  <pre>  &lt;host id=&quot;localhost&quot;
	hostname=&quot;localhost&quot;
	ip=&quot;127.0.0.1&quot;
	port=&quot;1099&quot;
	<strong>networking=&quot;org.dant.ant.extension.net.LocalHelper&quot;</strong>/&gt;</pre>
  <p>Defined a localhost , the commands send to this host will execute locally. </p>
  <p>&nbsp;</p>
  <pre>  &lt;host id=&quot;greatwall&quot;
	hostname=&quot;greatwall.apac.dant.org&quot;
	ip=&quot;10.129.9.1&quot;
	port=&quot;1099&quot;
	<strong>networking=&quot;org.dant.ant.extension.net.rmi.RMIHelper&quot;</strong>/&gt;</pre>
  <p></p>
   Defined a remote machine, whose fully qualified hostname is greatwall.apac.dant.org.<br>
  it will accept the remote commands through RMI networking facility. <br>
  On that machine we run Dant RMI daemon.
  <pre>  &lt;host id=&quot;summerpalace&quot;
	hostname=&quot;summerpalace.apac.dant.org&quot;
	ip=&quot;10.129.9.2&quot;
	port=&quot;8080&quot;
	<strong>basedir=&quot;/local/workspace&quot;</strong>
	<strong>networking=&quot;org.dant.ant.extension.net.soap.SOAPServiceHelper&quot;</strong>/&gt;
</pre>
  <p>Defined a remote host, whose fully qualified hostname is summerpalace.apac.dant.org. <br>
  It will accept the remote commands through <a href="http://ws.apache.org/soap/index.html">Apache SOAP service</a>. <br>
  On the machine we run a Web Container like Tomcat, and in the container we deploied our Apache SOAP service - dant.war </p>
  <p>The basedir is set to /local/workspace. <br>
  if the dir used in any tasks is not an absolute dir, this basedir will be inserted before the dir </p>
  <p>For example:</p>
  <pre>&lt;remoteexec dir=&quot;projects/dant&quot; executable=&quot;dir&quot; hostref=&quot;summerpalace&quot;/&gt;</pre>
  <p>The 'dir' command will executed in <strong>/local/workspace/projects/dant</strong> directory on host <strong>summerpalace</strong>. </p>
  <pre>
  &lt;host id=&quot;forbiddencity&quot;
	hostname=&quot;forbiddencity.apac.dant.org&quot; 
	ip=&quot;10.129.9.3&quot;
	port=&quot;1979&quot;
	networking=&quot;org.dant.ant.extension.net.socket.SocketHelper&quot;
	<strong>highwartermark=&quot;10&quot;</strong>/&gt;
</pre>
Defined a remote host, whose fully qualified hostname is forbiddencity.apac.dant.org. <br>
On that host we run a Dant socket daemon. <br>
The host can run 10 processes in parallel max. </blockquote>

<p>&nbsp;</p>
<hr>
<p align="center">Copyright &copy; 2005 Dant Organization. All rights Reserved.</p>

</body>
</html>

